/* 
 * File:   cliente.cpp
 * Author: saulio
 *
 * Created on April 30, 2012, 9:17 PM
 */



#include"Frame.h"

static const unsigned short QUIMERA_PORT=707;
using namespace std;
  
 
int main(){
           
    char buffer[]="ready";
    char ip[]="10.0.0.3";        
    int sockfd, n;
    struct sockaddr_in serv_addr;
    unsigned int serv_leng=sizeof(serv_addr);
    bzero((char *) &serv_addr, sizeof(serv_addr));
    sockfd = socket(AF_INET, SOCK_DGRAM, 0);
    serv_addr.sin_family = AF_INET;
    serv_addr.sin_addr.s_addr=inet_addr(ip);
    serv_addr.sin_port = htons(QUIMERA_PORT);
      
    n = sendto(sockfd, &buffer,sizeof(buffer), 0, (struct sockaddr *)&serv_addr, serv_leng);
    cout<<"Bytes enviados: "<<n<<endl;
    close(sockfd);
    return 0;
 }





